"""保存cookies"""

from selenium import webdriver
import time

import urllib3

import threading


# 自动登录
drive = webdriver.Chrome()
drive.get('https://aregsr.vip/')
drive.find_element_by_id('goin').click()
drive.find_element_by_id('ls_username').send_keys('ggfygg')
drive.find_element_by_id('ls_password').send_keys('fhrAKMv@A4NXLkN')
drive.find_element_by_class_name('mem_login').click()
time.sleep(2)

# selenium保存cookies
import json

cookies = drive.get_cookies()
with open("cookies.txt", "w") as fp:
    json.dump(cookies, fp)

# requests读取cookies

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)




































